package com.market;
public enum StateCode {
    ADD_GOODS_SUCCESS(100,"新增商品成功"),
    ADD_GOODS_FAILURE(101,"新增商品失败");

    private final int code;
    private final String msg;

    private StateCode(int code,String msg)
    {
        this.code = code;
        this.msg=msg;
    }

    public String getMsg() {
        return msg;
    }
    public int getCode(){
        return code;
    }
}
class Main{
    public static void main(String[] args) {
        System.out.println(StateCode.ADD_GOODS_SUCCESS.getCode());
        System.out.println(StateCode.ADD_GOODS_SUCCESS.getMsg());
    }
}